Skip to content

Instantly share code, notes, and snippets.

Introduction

Sometimes you may want to use a DNS server for specific domain requests and another DNS server for all other requests. This is helpful, for instance, when connected to a VPN. For hosts behind that VPN you want to use the VPN's DNS server but all other hosts you want to use Google's public DNS. This is called "DNS splitting."

Here, we run dnsmasq as a background service on macOS. The dnsmasq configuration described below implements DNS splitting.

Install

brew install dnsmasq
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active September 10, 2026 18:33
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@jjb
jjb / file.md
Last active September 10, 2026 18:28
Using Jemalloc 5 with Ruby.md

For years, people have been using jemalloc with ruby. There were various benchmarks and discussions. Legend had it that Jemalloc 5 didn't work as well as Jemalloc 3.

Then, one day, hope appeared on the horizon. @wjordan offered a config for Jemalloc 5.

Ubuntu/Debian

FROM ruby:3.1.2-bullseye
RUN apt-get update ; \
@toon-van-berkel
toon-van-berkel / dice.ts
Created September 10, 2026 18:22
A small TypeScript dice expression parser for notation like 2d6+3, d20 or 4d8-2.
export interface DiceResult {
expression: string;
rolls: number[];
modifier: number;
total: number;
}
/**
* Rolls a standard dice expression.
*

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@toon-van-berkel
toon-van-berkel / accessible-tabs.html
Created September 10, 2026 18:22
Accessible dependency-free tabs with ARIA roles and keyboard navigation.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
>
<title>Accessible Tabs</title>
@pipethedev
pipethedev / go-deslop.md
Created September 7, 2026 13:10
Markdown file to de-slop your go codebase

Go Codebase Cleanup: Remove Defensive Over-Engineering and AI Slop

Audit this Go codebase and aggressively simplify AI-generated, defensive, overly abstract, or unnecessarily generic code.

The goal is to make the code look like it was written by an experienced Go engineer:

  • simple
  • explicit
  • strongly typed
  • boring
@toon-van-berkel
toon-van-berkel / Example.svelte
Created September 10, 2026 18:20
A reusable Svelte action for detecting clicks outside an element.
<script lang="ts">
import { clickOutside } from './clickOutside';
let open = false;
</script>
<button onclick={() => (open = !open)}>
Toggle menu
</button>
@toon-van-berkel
toon-van-berkel / database.ts
Last active September 10, 2026 18:21
Minimal SQLite setup for Node.js using better-sqlite3, WAL mode and foreign keys.
import Database from 'better-sqlite3';
const db = new Database('data.db');
// Better concurrency for applications with frequent reads.
db.pragma('journal_mode = WAL');
// SQLite does not enable foreign key constraints by default.
db.pragma('foreign_keys = ON');